﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="UncleBobWebService.Models" %>

<!DOCTYPE html>

<html>
<head id="JobListQuestions" runat="server">
    <title>Applications_Status_List</title>
    <link href="/Theme/UncleBobTheme.css" rel="Stylesheet" />
</head>

<body>
<h2>Applications Status</h2>
    <div class="body">

         <!-- Begin Form 
                                  Method    Route Config Name
        -->
        <% using (Html.BeginForm("FormAction", "ApplicationStatusList", FormMethod.Post))
           {%>
            <div class="table-box">
                <div class="left-justify">
                <% KioskUser user = Model as KioskUser;%>                    
                    <h1>Applications Submitted</h1>
                    <br />
                    <div class="table">
                        <div class="row">
                            <span class="cell" style="font-weight:bold;">Application Date</span>                         
                            <span class="cell" style="font-weight:bold;">Job Title</span>                            
                            <span class="cell" style="font-weight:bold;">Application Status</span>
                        </div>
                        <br />

                        <!-- Display all the jobs -->
                        <% int count = 0; %>                        
                        <% foreach (JobApplication jobApp in user.JobApplications.Values) {%>
                        <div class="row">
                            <span class="cell"><%=Html.DisplayFor(model => jobApp.ApplyDate)%></span>
                            <span class="cell"><%=Html.DisplayFor(model => jobApp.Job.Title)%></span>                                                   
                            <span class="cell"><%=Html.DisplayFor(model => jobApp.Status)%></span>                                                   
                        </div>
                        <br />

                        <% ++count; %>

                        <%}%>
                    </div>   
                </div>
            </div>

            <!-- Buttons -->
            <input class="button" type="submit" name="previous" value="Previous" />            
        <%}%>

    </div>
</body>

</html>